<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="./css//font_ehvsqne413f/iconfont.css">
</head>
<body>
    <div class="extension">
<!--        <div class="extension-header">-->
<!--            <span>-->
<!--                <i class="icon iconfont icon-fanhui"></i>-->
<!--            </span>-->
<!--            <h3>启辕延保</h3>-->
<!--        </div>-->
        <div class="extension-section">
            <div class="banner">
                <img src="./images/banner.png" alt="">
            </div>
            <div class="introduce">
                <h6>延保产品介绍</h6>
                <table class="introduce-table">
                    <tr>
                        <th>
                            产品名称
                        </th>
                        <th >
                            服务范围
                        </th>
                        <th>
                            建议售价
                        </th>
                        <th>
                            优惠说明
                        </th>
                    </tr>
                </table>
            </div>
<!--            <ul class="extension-tel clearfix">-->
<!--                <li>-->
<!--                    <img src="./images/tel.png" alt="">-->
<!--                </li>-->
<!--                <li> <a href="tel:400-150-1999"> 400-150-1999</a></li>-->
<!--            </ul>-->
        </div>
    </div>
</body>
<script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
<script>
    if (window.location.origin.indexOf('https://erp.anpxd.com') >= 0) {
        var $apiAddress = 'https://erp.anpxd.com/';
        var imageUrl = 'https://fdfs.anpxd.com/'; //正式图片服务器地址
    } else {
        var $apiAddress = 'http://testerp.anpxd.com/';
        var imageUrl = 'http://testfile.anpxd.com:8083/'; //测试图片服务器地址
    }
    // 延保服务列表
    function extensionList(callback, data) {
        $.get($apiAddress + 'controller/insuranceGoods/selectInsuranceGoodsList', data, function (res) {
            if (typeof res != 'object') res = JSON.parse(res);
            var list = res.result;
            if (callback && typeof callback == 'function') {
                callback(list);
            }
        });
    };
    extensionList(renderlist);
    function renderlist(list) {
        for (var i = 0; i < list.length; i++) {
            $('.introduce-table').append('<tr><td>' + list[i].goodsName + '</td><td>' + list[i].goodsServerDesc +
                '</td><td>' + list[i].goodsAdvicePrice + '元</td><td ><ul class="explain"></ul></td></tr>\n');
                
            $(list[i].goodsDiscountDesc.split('/单')).each(function (index, elem) {
                if(elem != '') {
                    var aLi = $('<li>' +elem + '/单</li>');
                    $('.explain').eq(i).append(aLi);

                }   
            });
        };
    }
</script>

</html>
